package com.nijie.library.service.impl.sys;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nijie.library.DAO.sys.BorrowInfoDao;
import com.nijie.library.POJO.Message;
import com.nijie.library.POJO.modelPOJO.BorrowInfoPojo;
import com.nijie.library.service.impl.base.BaseSvcImpl;
import com.nijie.library.service.sys.BorrowInfoSvc;
@Service("borrowInfoSvc")
public class BorrowInfoSvcImpl extends BaseSvcImpl<BorrowInfoPojo> implements BorrowInfoSvc{
	@Autowired
	private BorrowInfoDao borrowInfoDao;
	@Override
	public Message<BorrowInfoPojo> backBook(String ids) {
		// TODO Auto-generated method stub
		Message<BorrowInfoPojo> message = new Message<BorrowInfoPojo>();
		try {
			borrowInfoDao.backBook(ids);
			message.setCode("102");
			message.setMsg("归还成功！");
		} catch (Exception e) {
			message.setCode("202");
			message.setMsg("归还发生意外错误！");
		}
		return message;
	}
}
